<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"
	xmlns:jc="http://jcertif.com/facelets">

<ui:composition template="/templates/template.xhtml">
	<ui:define name="content">
	
		<jc:pageBanner title="#{msg['join.banner.title']}"/>
		
		<div class="form-intro">#{msg['join.intro']}</div>
		<br/>
		<h:form id="join">
			<h:panelGrid columns="2" columnClasses="label, value" styleClass="grid" >
				<h:outputText value="#{msg['join.email']} *" />
				<p:inputText id="email" value="#{joinBean.user.email}" required="true" requiredMessage="#{msg['join.email.reqmsg']}" validatorMessage="#{msg['join.email.invalidmsg']}"/>
				
				<h:outputText value="#{msg['join.confirmemail']} *" />
				<p:inputText id="confirmemail"  value="#{joinBean.user.confirmemail}" required="true" requiredMessage="#{msg['join.confirmemail.reqmsg']}" validatorMessage="#{msg['join.confirmemail.invalidmsg']}" />

				<h:outputText value="#{msg['join.password']} *" />
				<p:inputText id="password" value="#{joinBean.user.passwd}" type="password" required="true" requiredMessage="#{msg['join.password.reqmsg']}"/>

				<h:outputText value="#{msg['join.confirmpassword']} *" />
				<p:inputText id="confirmpassword" value="#{joinBean.user.confirmpasswd}" type="password" required="true" requiredMessage="#{msg['join.confirmpassword.reqmsg']}"/>

				<h:outputText value="#{msg['join.firstname']} *" />
				<p:inputText value="#{joinBean.user.prenom}" required="true" requiredMessage="#{msg['join.firstname.reqmsg']}"/>

				<h:outputText value="#{msg['join.lastname']} *"  />
				<p:inputText value="#{joinBean.user.nom}" required="true" requiredMessage="#{msg['join.lastname.reqmsg']}"/>

				<h:outputText value="#{msg['join.role']}" />
				<p:selectOneMenu value="#{joinBean.user.role}" effect="fold">
					<f:selectItem itemLabel="#{msg['select.one']}" itemValue="" />
					<f:selectItems value="#{joinBean.rolesParticipant}" var="selectedRole" itemLabel="#{selectedRole.description}" itemValue="#{selectedRole.code}" />
				</p:selectOneMenu>

				<h:outputText value="#{msg['join.type']}" />
				<p:selectOneMenu value="#{joinBean.user.typeUser}" effect="fold" >
					<f:selectItem itemLabel="#{msg['select.one']}" itemValue="" />
					<f:selectItems value="#{joinBean.typesParticipant}" var="selectedType" itemLabel="#{selectedType.description}" itemValue="#{selectedType.code}" />
				</p:selectOneMenu>

				<h:outputText value="#{msg['join.company']}" />
				<p:inputText value="#{joinBean.user.compagnie}"/>

				<h:outputText value="#{msg['join.website']}" />
				<p:inputText value="#{joinBean.user.siteWeb}"/>

				<h:outputText value="#{msg['join.homephone']}" />
				<p:inputText value="#{joinBean.user.telFixe}"/>

				<h:outputText value="#{msg['join.mobilephone']}" />
				<p:inputText value="#{joinBean.user.telMobile}"/>

				<h:outputText value="#{msg['join.city']}" />
				<p:inputText value="#{joinBean.user.ville}"/>

				<h:outputText value="#{msg['join.country']}" />
				<p:inputText value="#{joinBean.user.pays}"/>


               
				<p:commandButton value="#{msg['join.save']}" update="join" actionListener="#{joinBean.save}"  />
				 <p:messages/>
				
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
</html>